<?php

/**
 * DetallePedidos form base class.
 *
 * @package    tercermilenio
 * @subpackage form
 * @author     Your name here
 */
class BaseDetallePedidosForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'det_ped_pedido'      => new sfWidgetFormInputHidden(),
      'det_ped_item'        => new sfWidgetFormInputHidden(),
      'det_ped_talle'       => new sfWidgetFormInput(),
      'det_ped_cantidad'    => new sfWidgetFormInput(),
      'det_ped_descripcion' => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'det_ped_pedido'      => new sfValidatorPropelChoice(array('model' => 'Pedidos', 'column' => 'ped_id', 'required' => false)),
      'det_ped_item'        => new sfValidatorPropelChoice(array('model' => 'DetallePedidos', 'column' => 'det_ped_item', 'required' => false)),
      'det_ped_talle'       => new sfValidatorString(array('max_length' => 3)),
      'det_ped_cantidad'    => new sfValidatorInteger(),
      'det_ped_descripcion' => new sfValidatorString(array('max_length' => 255)),
    ));

    $this->widgetSchema->setNameFormat('detalle_pedidos[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DetallePedidos';
  }


}
